package com.atguigu.gulimall.product.convert;


import com.atguigu.gulimall.product.entity.AttrEntity;
import com.atguigu.gulimall.product.vo.AttrVo;
import com.atguigu.gulimall.product.vo.response.AttrRespVo;
import org.mapstruct.Mapper;

/**
 * @author Zyx
 * @since 2021/5/29 10:29 上午
 */
@Mapper(componentModel = "spring")
public abstract class ConvertMapper {

    public abstract AttrEntity attrVo2AttrEntity(AttrVo attrVo);

    public abstract AttrRespVo attrEntity2AttrRespVo(AttrEntity attrEntity);


    /**
     * @Inher
     * @InheritInverseConfiguration 反向继承配置
     * name 参数用来指定对哪个方法进行反向映射
     */
    // @InheritConfiguration(name = "convert")
    // @InheritInverseConfiguration(name = "convert")
    // @BeanMapping(ignoreByDefault = true)
    // public abstract void convertInverse(AttrEntity attrEntity, @MappingTarget AttrVo attrVo);
}
